<?
	if($model->id==0){
		$hidden['content_id']=$this->input->get('parent_id');
		$hidden['position']=1000;
	}
	
	
	$hidden['formtype']='single';

?>

<div class='contentheader'>Neuer Medienlink</div>
<?
echo form::open_multipart(NULL, '', $hidden);
echo form::hidden('id', $model->id);


echo form::open_fieldset();

echo myform::inputfield('title','Titel',$model->title);
echo myform::textarea('text','Text', $model->text);
echo myform::imgelm('Bild',$model->media_id);


echo form::close_fieldset();
/*
echo form::open_fieldset();
echo '<p>';
echo form::label('media_container','Media Container');
echo myform::media_selector('media_id','Media', $model->media_id, '');
echo '</p>';
echo form::close_fieldset();

echo form::open_fieldset();
echo '<p>';
echo form::label('file', 'Upload File');
echo form::upload(array('name' => 'file'));
echo '</p>';

echo '<p>';
echo form::label('category_id', 'Category');
echo form::dropdown('category_id', ORM::factory('category')->get_pulldown_list());
echo '</p>';

echo form::close_fieldset();
*/
echo myform::submit();

echo form::close();
?>